﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    /// <summary>
    /// 对应数据库中 return_detail 表的实体类
    /// </summary>
    public class OmPurchaseReturnDetail
    {
        /// <summary>
        /// 进货退货明细ID，对应数据库表中 up_return_detail_id 列，类型 bigint
        /// </summary>
        [Key]
        public long UpReturnDetailId { get; set; }

        /// <summary>
        /// 进货退货ID，对应 up_return_id 列，类型 bigint
        /// </summary>
        public long UpReturnId { get; set; }

        /// <summary>
        /// 货品编号，对应 goods_code 列，类型 varchar(50)
        /// </summary>
        public string GoodsCode { get; set; }

        /// <summary>
        /// 货品类型ID，对应 goods_type_id 列，类型 bigint
        /// </summary>
        public long GoodsTypeId { get; set; }

        /// <summary>
        /// 订单数量，对应 order_quantity 列，类型 decimal(18, 2)
        /// </summary>
        public decimal OrderQuantity { get; set; }

        /// <summary>
        /// 当前采购退货数量（列名较长，按实际完整列名调整，这里简化示意），对应 current_purchase_return_... 列，类型 decimal(18, 2)
        /// </summary>
        public decimal CurrentPurchaseReturnQuantity { get; set; }

        /// <summary>
        /// 已入库数量，对应 received_quantity 列，类型 decimal(18, 2)
        /// </summary>
        public decimal ReceivedQuantity { get; set; }

        /// <summary>
        /// 已退货数量，对应 returned_quantity 列，类型 decimal(18, 2)
        /// </summary>
        public decimal ReturnedQuantity { get; set; }

        /// <summary>
        /// 是否删除，对应 is_delete 列，类型 char(1)
        /// </summary>
        public string IsDelete { get; set; }

        /// <summary>
        /// 附件ID，对应 attachment_id 列，类型 bigint
        /// </summary>
        public long AttachmentId { get; set; }

        /// <summary>
        /// 备注，对应 remarks 列，类型 varchar(500)
        /// </summary>
        public string Remarks { get; set; }
    }
}
